#ifndef A70ABE12_3763_4C67_BDD0_A0D313F5BC60
#define A70ABE12_3763_4C67_BDD0_A0D313F5BC60
#include<bits/stdc++.h>
using namespace std;
const int M = 9997;
const int base = 233;
typedef long long ll;
int get_hash(string s) {
  int res = 0;
  int len=(int)s.size();
  for (int i = 0;i<len; ++i) {
    res = (ll)(res * base + s[i]) % M;
  }
  return res;
}
const int SIZE = 100;
struct HashTable {
    struct Node {
        int next, value, key;
    } data[SIZE];
    int head[M], size;
    int f(int key) { return key % M; }
    int get(int key) {
        for (int p = head[f(key)]; p; p = data[p].next)
            if (data[p].key == key) return data[p].value;
        return -1;
    }
    int modify(int key, int value) {
        for (int p = head[f(key)]; p; p = data[p].next)
            if (data[p].key == key) return data[p].value = value;
    }
    int add(int key, int value) {
        if (get(key) != -1) return -1;
        data[++size] = (Node) {head[f(key)], value, key};
        head[f(key)] = size;
        return value;
    }
};

#endif /* A70ABE12_3763_4C67_BDD0_A0D313F5BC60 */
